package com.chexiehui.jc.mvp.car;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BasePage;
import com.chexiehui.jc.base.BaseView;
import com.chexiehui.jc.entity.BrandListInfo;
import com.chexiehui.jc.entity.CarSeriesInfo;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 新能源
 * @Auth SongJun
 * @Date 2020/05/21 00:18
 **/
public interface CarGarageEnergyCovenant {

    interface View extends BaseView {
        void onGetHotSeriesListSuccess(BaseModel<BasePage<CarSeriesInfo>> successResult);

        void onGetHotSeriesListFailure(BaseModel<Object> failureResult);

        void onGetBrandListSuccess(BaseModel<List<BrandListInfo>> successResult);

        void onGetBrandListFailure(BaseModel<Object> failureResult);

    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_CAR_HOT_SERIES)
        Observable<BaseModel<BasePage<CarSeriesInfo>>> getHotSeriesList(
                @Field("type") String type,
                @Field("energy") String energy,
                @Field("pageIndex") int pageIndex,
                @Field("pageSize") int pageSize);

        @FormUrlEncoded
        @POST(Constants.URL_BRAND_LIST)
        Observable<BaseModel<List<BrandListInfo>>> getBrandList(@Field("timespan") String timespan);
    }

    interface Presenter {
        void getHotSeriesList();

        void getBrandList();
    }

}